x86: Free per-cpu area for offline cpu via RCU.
authorKeir Fraser <keir@xen.org>
Sat, 8 Jan 2011 09:14:23 +0000 (09:14 +0000)
committerKeir Fraser <keir@xen.org>
Sat, 8 Jan 2011 09:14:23 +0000 (09:14 +0000)
commit1be584b57a4657d680e5551dc253ce164f06b4ac
tree48271f4d31f3bbfdb8f2d8d57f3ad04b8d64a5f3
parentc65422a6c4fdff1e47ea55e7701b53208c3bc429
x86: Free per-cpu area for offline cpu via RCU.

This allows other CPUs to reference per-cpu areas with less strict
locking. In particular, timer.c access a per-cpu lock with reference
to a per-timer cpu field which it accesses with no synchronisation.

One subtlety is that this prevents us bringing a cpu back online until
the RCU work is completed. In this case we return EBUSY and the
tool stack can report the (unlikely) error, or retry, as it sees fit.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/percpu.c